<?php



require_once "../Common/database.php";
require_once "../Common/values.php";

   $result = mysql_query("SELECT * FROM tblUsers WHERE Name='$user'");
   $row = mysql_fetch_array($result);
if($row[s]>2)
{

$query="UPDATE tblsettings SET ip='$_POST[ip]',lansweeper='$_POST[lansweeper]',status='$_POST[status]',title='$_POST[title]',company='$_POST[company]',`lock`='$_POST[lock]',lockreason='$_POST[lockreason]',publiclock='$_POST[plock]',lockreason='$_POST[lockreason]',ldap='$_POST[ldap]',ldapaddress='$_POST[ldapaddress]',ldapusername='$_POST[ldapusername]',ldappassword='$_POST[ldappassword]',itemails='$_POST[itemails]',publicemails='$_POST[publicemails]',smtp='$_POST[smtp]',emailgroup='$_POST[emailgroup]',Domain='$_POST[domain]',defaultpro='$_POST[defaultpro]' WHERE `ID`='0'";

mysql_query($query);

echo '<h3>Updated system settings</h3>';
echo '<p><a href="../index.php?p=settings">Back</a>';
}
else
{
    echo '<h3>Access Denided</h3>';
}


?>